Report Command Registry entry
Enables data to be extracted from a record and passed to a script for processing. It is most often used for fast report generation, however it may be that the script simply manipulates the data and saves it for another process to pick up (e.g. converting data to csv format).
Several reports required in the Vitalware System must be produced in a timely manner, e.g. automatic letter generation when a customer has not included enough money in a mail order. Crystal Reports may not be the most efficient solution or may be incapable of producing these types of reports. Instead a script is written that produces the report and sends it straight to the printer, and the trigger for the report is coded into the client. Thus we are able to produce a report without having to do an export.
The purpose of this entry is to define the command to run when a report is triggered.
Usage
This Registry entry is assigned to groups:
Key | Group |
---|---|
Key 1 | Group |
Key 2 | Default |
Key 3 | Table |
Key 4 | table |
Key 5 | Report Command |
Value | command |
Group | Default | Table | table | Report Command | command |
where:
Report | is the name coded into the client for a particular report. | |
command | contains the script to run, along with any command line arguments for the script. The syntax for command is: scriptName [-x{Column}]... where: | |
scriptName | is the name of the script that produces the report and is located in | |
[-x{Column}]... | is an optional list of command line options, each specifying a field to pass to the script. The client reads in this entry and substitutes the data stored in Column into the command, thus passing the data to the script. |
Note:
Due to the customer specific nature of these reports, the scripts that produce them must be located in ~/local/bin
The following special command line options are currently recogni
Option | Description |
---|---|
| The address routine the particular module is called. An address routine exists in every module, and when called it creates a string containing the appropriately formatted address fields for that module. For this option, the address string is substituted back into the command in place of {@Address}. |
| The client queries for the user's default printer in the current module, and substitutes the printer name in place of {@Printer}. |
| The count routine for the particular module is called. In POS, this routine returns the number of certificates ordered. This number is then substituted back into the command in place of {@Count}. |
Example
Key | Value | Description |
---|---|---|
Key 1 | Group | |
Key 2 | Default | |
Key 3 | Table | |
Key 4 | epos | |
Key 5 | Production Slip Command | Production Slip is the name of the report. |
Value | vwproductionslip -i{irn} -n{SalCorrespondenceNumber} -d{AdmDateInserted} -a{AppName_tab} -c{@Count} -da{@Address} -p{@Printer} |